
import React, {Component} from 'react';
import {Text, View, Image, StyleSheet,
  TouchableOpacity
} from 'react-native';
export default class Cell extends Component{
  render(){
    return(
      <TouchableOpacity onPress={this.props.press} 
          activeOpacity={this.props.activeOpacity?this.props.activeOpacity:0.6}>
        <View style={[styles.container,this.props.style]}>
          <Text style={styles.titleText}>{this.props.title}</Text>
          <Image source={require('../images/icon_right.png')} style={styles.rightArrowImg}/>
        </View>
      </TouchableOpacity>
    )
  }
}
const styles = StyleSheet.create({
  rightArrowImg:{
    width:14,
    height:14,
    marginLeft:5,
    marginRight:5,
    paddingRight:2,
  },
  titleText:{
    marginLeft:0,
    fontSize:14,
    paddingTop:3,
    paddingBottom:3,
    color: '#333'
  },
  container:{
    padding: 10, 
    backgroundColor:'white',
    borderBottomColor:"#ddd",
    borderBottomWidth:0.5,
    flexDirection:'row',
    justifyContent:'space-between',
    alignItems:'center',
  },
});